<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:80:"/home/wwwroot/www.scp.test/application/orgadmin/view/examination/examrecord.html";i:1527146866;s:62:"/home/wwwroot/www.scp.test/application/orgadmin/view/base.html";i:1527146866;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>闪测评管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!--<link rel="stylesheet" href="__CSS__/bootstrap.min.css" media="all">-->

    <link rel="stylesheet" href="__JS__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__CSS__/font-awesome.min.css">
    <!--CSS引用-->
    
    <link rel="stylesheet" href="__CSS__/admin.css">
    <link rel="stylesheet" href="__CSS__/ruanyuan.css?v=2">
    <!--[if lt IE 9]>
    <script src="__CSS__/ "></script>
    <script src="__CSS__/respond.min.js"></script>
    <![endif]-->
</head>
<style>
	.organ-logo {
		width: 50px;
	}
	.status-1 {
		color: #fb9a50;
	}
	#exam-qrcode .layui-form-label {
		width: 70px;
	}
	#exam-qrcode .layui-input-inline {
		margin-right: 0;
		width: 240px;
	}
	#exam-qrcode .qrcode-img {
		text-align: center;
		margin-top: 40px;
	}
	#exam-qrcode .qrcode-img img {
		width: 150px;
	}
	#exam-qrcode .tips-text {
		font-size: 12px;
		color: #999;
		text-align: center;
		margin: 10px 0 30px;
	}
	#exam-qrcode .copy-url {
		margin: 0;
		height: 36px;
		line-height: 36px;
		border: 1px solid #e6e6e6;
		border-left: 0;
		width: 80px;
		text-align: center;
	}
	.exam-edit-title {
		height: 40px;
		line-height: 40px;
		padding-left: 5px;
		background-color: #f1f1f1;
		border-bottom: 1px solid #e6e6e6;
		margin-bottom: 10px;
	}
	.exam-tips {
		font-size: 14px;
		color: #333;
		margin: 5px 0;
	}
	.exam-tips span {
		color: #34b0e2;
	}
	#edit-exam-form {
		padding: 15px;
	}
	.exam-title {
		margin: 20px 0 10px;
	}
	#ispart-box {margin: 10px 0 10px;}
	.pub-text-box {display: none;}
	.pub-text-box.show {display: block;}
	.exam-title {display: none;}
	.layui-upload-button {margin-left: 10px;}
	.may-add {color: #12b262;}
	.cannot-add {color: #0000ff;cursor: pointer;}
	#add-exam-form {padding: 15px;}
	.level-text {color: #00a0e9;}
	.tips-box {padding: 20px 30px 10px;text-align: center;}
	.level-name {font-size: 16px;color: #c2c2c2;}
</style>
<body>
<div class="layui-layout layui-layout-admin">
    <!--头部-->
    <div class="layui-header header">
        <span class="layui-header title"><img src="__UPLOAD__/default-logo-web.png"/><?php echo $site_config['site_title']; ?></span>
		<span class="layui-header level-name">[<?php echo $level_name; ?>]</span>
		<span style="position: absolute;top: 0;right: 20px;">
        <ul class="layui-nav" style="float:right;background: none;">
			<li class="layui-nav-item"><a href="javascript:;" data-href="<?php echo url('orgadmin/examination/getUserExam',['id'=>$organ_id]); ?>" class="preview_user">链接/二维码</a></li>
			<li class="layui-nav-item"><a href="<?php echo url('/orgadmin/index/index'); ?>">机构设置</a></li>
            <li class="layui-nav-item">欢迎您，<?php echo $organ_name; ?></li>
        </ul>
		</span>
    </div>

    <!--侧边栏-->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item layui-nav-title"><a>管理菜单</a></li>
				<li class="layui-nav-item">
                    <a href="javascript:;"><i class="fa fa-file-text"></i> 题集管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="<?php echo url('orgadmin/examination/index'); ?>" class="examination-org"> 题集列表</a></dd>
                        <dd><a href="<?php echo url('orgadmin/examination/examrecord'); ?>" class="activeid-org"> 答题记录</a></dd>
                    </dl>
                </li>
                
				<li class="layui-nav-item">
                    <a href="<?php echo url('orgadmin/index/index'); ?>" class="orgadmin-cog"><i class="fa fa-home"></i> 机构设置</a>
                </li>
            </ul>
        </div>
    </div>

    <!--主体-->
    
<style>

</style>
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">全部记录</li>
        </ul>
        <div class="lui-table" style="height:auto;">
            <table class="layui-table">
                <thead>
                <tr>
                    <th>答题时间</th>
                    <th>题集名称</th>
                    <th>学科</th>
                    <th>适用年级</th>
                    <th>成绩</th>
                    <th>姓名</th>
                    <th>联系方式 <input type="checkbox" name="" class="isphone" <?php if($isphone == 1): ?>checked="checked"<?php endif; ?>></th>
                    
                    <th>答题详情</th>
                </tr>
                </thead>
                <tbody>
                <?php if(is_array($stulist) || $stulist instanceof \think\Collection || $stulist instanceof \think\Paginator): $i = 0; $__LIST__ = $stulist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i;?>
                <tr>
                    <td><?php echo date('Y-m-d H:i:s',$so['create_time']); ?></td>
                    <td><?php echo gdata('examination',$so['examination_id'],'name'); ?></td>
                    <td><?php echo $subject[$so['subject']]['stageName']; ?><?php echo $subject[$so['subject']]['name']; ?></td>
                    <td><?php echo $subject[$so['subject']]['stageName']; ?></td>
                    <td><font color="#4782f6"><?php echo floatval($so['score']); ?>/<?php echo gdata('examination',$so['examination_id'],'exam_num'); ?></font></td>
                    <td><?php echo !empty($so['answer_name'])?$so['answer_name']:'--'; ?></td>
                    <td><?php echo !empty($so['answer_mobile'])?$so['answer_mobile']:'--'; ?></td>
                    
                    <td><a href="<?php echo url('examination/studentresult','isrecord=1&id='.$so['id']); ?>" class="layui-btn layui-btn-normal layui-btn-mini">查看</a></td>
                </tr>
                <?php endforeach; endif; else: echo "" ;endif; ?>
                <tr>              
            </table>
            <?php echo $pshow; ?>
            <div style="height:20px; clear:both;"></div>
        </div>
  </div>

</div>


    <!--底部-->
    <div class="layui-footer footer">
        <div class="layui-main">
            <p>2017-2018 &copy; <a href="http://www.ruanyun.net" target="_blank">软云科技 400-182-6266</a></p>
        </div>
    </div>
</div>

<script>
    // 定义全局JS变量
    var GV = {
        current_controller: "orgadmin/<?php echo (isset($controller) && ($controller !== '')?$controller:''); ?>/",
		activeid: "<?php echo (isset($activeid) && ($activeid !== '')?$activeid:''); ?>",
        base_url: "__STATIC__"
    };
	var levname = '<?php echo $level_name; ?>';
	var level   = <?php echo $level; ?>;
</script>
<!--JS引用-->
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/layui/lay/dest/layui.all.js"></script>
<script src="__JS__/admin.js"></script>
<script src="__JS__/dist/clipboard.min.js"></script>

<script>
	$('.preview_user').on('click',function(){
		var _href = $(this).attr('data-href');
		$.ajax({
			url: _href,
			type: "get",
			success: function (info) {
				if (info.code === 1) {
					var qrcode = info.info.qrcode;
					var url = info.info.exam_url;
					
					var html = '<div id="exam-qrcode" class="layui-form-item"><div class="layui-block"><div class="layui-block qrcode-img">'
							 + '<img src="'+ qrcode +'"></div><div class="layui-block tips-text">使用微信扫描可查看机构</div></div>'
							 + '<div class="layui-block"><label class="layui-form-label">机构链接:</label><div class="layui-input-inline">'
							 + '<input id="exam_url" type="text" name="exam_url" value="'+ url +'" class="layui-input layui-input-inline"/></div>'
							 + '<div id="cpoy_exam_url" data-clipboard-text="'+url+'" class="layui-inline copy-url">复制链接</div></div></div>';
					
					layer.open({
						type: 1,
						title: '链接/二维码',
						content: html,
						btn: ['关闭'],
						area: ['450px', '410px'],
						success: function(layero, index){
							var btn = document.getElementById('cpoy_exam_url');
							var clipboard = new Clipboard(btn);
							//复制成功执行的回调，可选
							clipboard.on('success', function(e) {
								layer.msg('复制成功');
							});

							//复制失败执行的回调，可选
							clipboard.on('error', function(e) {
								layer.msg('复制失败');
							});
						}
					})
				}else{
					layer.msg(info.msg);
				}
			}
		});
	})
   $('.layui-nav-child dd').removeClass('layui-this');
   $(document).ready(function(e) {
     $('.layui-nav-tree').find("."+GV.activeid+"").parent().addClass('layui-this').parents('.layui-nav-item').addClass('layui-nav-itemed');  
   });
</script>
<!--页面JS脚本-->

 <script>
  $(".isphone").click(function(e) {
    var isck = $(this).is(":checked");
	var uri  = '<?php echo url("orgadmin/examination/examrecord","",""); ?>';
	var page = '<?php echo $page; ?>';
	if ( isck ) {
	  window.location.href = uri+'/isphone/1';
	} else {
	  window.location.href = uri+'/isphone/0';
	}
  });
 </script>

</body>
</html>